package fitdroid.tabs;

import android.app.ActivityGroup;
import android.app.LocalActivityManager;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TableLayout;
import coderminus.maps.R;

public class runsetup extends ActivityGroup {
	protected static final String TAG = "runsetup";

	private Button startbutton;
	private TableLayout contentlayout = null;
	private LocalActivityManager mActivityManager = null;
	
	private Intent next = null;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.runsetup);

		startbutton = (Button) findViewById(R.id.startbutton);
		startbutton.setOnClickListener(startbuttonListener);

		contentlayout = (TableLayout) findViewById(R.id.widget30);
		mActivityManager = getLocalActivityManager();

		
		next = new Intent(this, coderminus.maps.MapsActivity.class);

	}
	
	private OnClickListener startbuttonListener = new OnClickListener() {
		public void onClick(View v) {
			Tracker.getInstance().up();
			
			Log.i(TAG, "intent_state set to (on start1)"
					+ Tracker.getInstance().getSem());
			Intent i = new Intent(runsetup.this, coderminus.maps.MapsActivity.class);
			startActivity(i);
			/*
			contentlayout.removeAllViews();
			contentlayout.setVisibility(View.VISIBLE);
			contentlayout.addView(mActivityManager.startActivity("", next)
					.getDecorView());
			*/
		}
	};
}
